#! /bin/sh

name=kernel
skip_pkg_check=yes
version=0.0git
revision=1
source_dir="kernel"
source_imagedeps="git"
source_allow_network="yes"
hostdeps="gcc v"
deps="core-libs"

prepare() {
    ./get-deps
}

build() {
    cp -rpf "${source_dir}"/. ./

    make -j${parallelism} \
        PROD="$PROD" \
        CC=${OS_TRIPLET}-gcc \
        LD=${OS_TRIPLET}-ld \
        AR=${OS_TRIPLET}-ar \
        OBJDUMP=${OS_TRIPLET}-objdump
}

package() {
    make install PREFIX="${prefix}" DESTDIR="${dest_dir}"

    post_package_strip
}
